﻿Imports Microsoft.Reporting.WinForms

Public Class frmInDSKhachHang
    Public _bs As BindingSource
    Public dsName As String
    Public rptName As String
    Public ch As tbCuaHang
    Public timkiemtheo As String

    Private Sub frmInReport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ReportViewer1.LocalReport.ReportPath = rptName
        Dim ds As New ReportDataSource
        ds.Name = dsName
        ds.Value = _bs

        ReportViewer1.LocalReport.EnableExternalImages = True

        ReportViewer1.LocalReport.DataSources.Clear()
        ReportViewer1.LocalReport.DataSources.Add(ds)
        ReportViewer1.LocalReport.SetParameters(DanhSachThamSo(ch, Me.Text))
        Dim pr As New ReportParameter("TimKiemTheo", timkiemtheo)
        ReportViewer1.LocalReport.SetParameters(pr)
        ReportViewer1.SetDisplayMode(DisplayMode.Normal)

        Me.ReportViewer1.RefreshReport()
    End Sub
End Class